add support for per-target rustflags in .cargo/config
authorJorge Aparicio <japaricious@gmail.com>
Tue, 4 Oct 2016 01:37:25 +0000 (20:37 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Tue, 4 Oct 2016 01:40:34 +0000 (20:40 -0500)
commite9a5fb14b011a0d93586d098701dfa2d493494e7
tree9eb73f41dae90a7fa6dec252ac15a6c9930c63cc
parentebcf0a8f41759717876bca5871137ab48e06f790
add support for per-target rustflags in .cargo/config

you can now specify rustflags on a per-target basis in .cargo/config:

``` toml
[target.x86_64-unknown-linux-gnu]
rustflags = ["x86", "specific", "flags"]

[target.arm-unknown-linux-gnueabi]
rustflags = ["arm", "specific", "flags"]
```

If both build.rustflags and target.*.rustflags are specified, the
target.* ones will be used.

As before RUSTFLAGS overrides either set.

closes #3153
src/cargo/ops/cargo_rustc/context.rs
tests/rustflags.rs